import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import router from './routes/index'
import 'highlight.js/styles/atom-one-dark.css'
import 'highlight.js/lib/common'
import hljs from 'highlight.js'
import hljsVuePlugin from '@highlightjs/vue-plugin'
import './base.css'
import './styles/responsive.css'
import './styles/tailwind.css'
import './styles/global.css'
const app = createApp(App)
//自定义一个代码高亮指令
app.directive('highlight', function (el) {
  const blocks = el.querySelectorAll('pre code');
  blocks.forEach((block: any) => {
      hljs.highlightBlock(block)
  })
})

app.use(hljsVuePlugin).use(router).mount('#app')
